<template>
  <a-modal
    :footer="false"
    v-model:visible="modalVisible"
    @ok="handleOk"
    @cancel="handleCancel"
    width="1000px"
  >
    <template #title> 申请原因 </template>
    <div>原因描述：</div>
    <div style="margin-top: 10px"
      ><a-textarea
        v-model="CauseDate"
        allow-clear
        style="height: 200px; color: black"
        disabled
        placeholder="无"
    /></div>
  </a-modal>
</template>

<script lang="ts" setup>
  import { cloneDeep } from 'lodash';
  import { reactive, computed, watchEffect, onMounted, ref } from 'vue';
  import { localGetUserInfo } from '@/utils/localStorage/account';

  const props = withDefaults(
    defineProps<{
      SeeCauseDate: any;
      visible: boolean;
    }>(),
    {
      visible: false,
    }
  );

  const emit = defineEmits(['update:visible', 'addRoleEmit']);

  // 判断用户是否显示弹出框
  const modalVisible = computed({
    get() {
      return props.visible;
    },
    set(visible: boolean) {
      emit('update:visible', visible);
    },
  });

  const CauseDate = ref();

  watchEffect(() => {
    if (props.visible) {
      CauseDate.value = cloneDeep(props.SeeCauseDate);
    }
  });
</script>

<style scoped lang="less"></style>
